<template>
<div>
  <h1 ref="ht1">h1的内容</h1>
  <button ref="btn" @click="showDom">ShowDom</button>
  <!-- :age 传过去的就可用于计算 不加冒号按字符串接收 -->
  <Teacher ref="tt" name="Tom" grade="初一班主任" :age="18"></Teacher>  
  <Teacher ref="tt2" name="Tina" grade="初二班主任" :age="20"></Teacher>
  </div>
</template>

<script>
import Teacher from './components/Teacher'

export default {
components:{
    Teacher
},
methods:{
  showDom(){
    console.log(this.$refs.ht1);
  }
}
}


</script>

<style>

</style>